package iss.anxios.service;

import iss.anxios.dao.ViewGroupDao;
import iss.anxios.dto.ViewGroup;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service("viewgroupservice")
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public class ViewGroupServiceImpl implements ViewGroupService{

	@Autowired
	private ViewGroupDao viewgroupdao;
	
	@Transactional(propagation = Propagation.REQUIRED, readOnly = false)
	public void addViewGroup(ViewGroup viewGroup) {
		viewgroupdao.SaveViewGroup(viewGroup);
	}

	@Override
	public List<ViewGroup> lisViewGroups() {
		return viewgroupdao.GetAllViewGroups();
	}

	@Override
	public void remove(ViewGroup viewGroup) {
	}

	@Override
	public ViewGroup GetViewGroupByID(int id) {
		return null;
	}

}
